Raspberry 4 can be used with either a 32-bit armv7l/armhf operating system (usually Raspbian) or a 64-bit aarch64 OS like Debian, Ubuntu, Arch or the Raspbian aarch64 beta.
When using a 32-bit Raspbian the installation is done as for Raspberry Pi 2/3 opencpn:opencpn_user_manual:getting_started:opencpn_installation: For 64-bit aarch64/amd64 OSes Opencpn is installed using Flatpak, there is no difference to using desktop OSes like Ubuntu or Fedora. See Flatpak